NewMovieFromDataFork
TheNewMovieFromDataFork
function enables you to retrieve a movie that is stored anywhere in the data fork of a specified file.
pascal OSErr NewMovieFromDataFork (Movie *theMovie, short fRefNum, long fileOffset, short newMovieFlags, Boolean *dataRefWasChanged);
theMovie
- Contains a pointer to the movie identifier for the movie to be retrieved. Your application obtains this movie identifier from such functions as
NewMovie
,NewMovieFromFile
, andNewMovieFromHandle
(described on page 2-80, page 2-76, and page 2-78, respectively).fRefNum
- Contains a file reference number to a file that is already open.
fileOffset
Specifies the starting file offset of the atom in the data fork of the
file specified by thefRefNum
parameter.newMovieFlags
- Contains the standard flags in the
newMovie
enumeration.newMovieActive
- Controls whether the new movie is active. Set this flag to 1 to make the new movie active. A movie that does not have any tracks can still be active. When the Movie Toolbox tries to play the movie, no images are displayed, because there is no movie data. You can make a movie active or inactive by calling the
SetMovieActive
function, which is described on page 2-131.newMovieDontAutoAlternate
- Controls whether the Movie Toolbox automatically selects enabled tracks from alternate track groups. If you set this flag to 1, the Movie Toolbox does not automatically select tracks for the movie--you must enable tracks yourself.
newMovieDontResolveDataRefs
- Controls how completely the Movie Toolbox resolves data references in the movie resource. If you set this flag to 0, the toolbox tries to completely resolve all data references in the resource. This may involve searching for files on remote volumes. If you set this flag to 1, the Movie Toolbox only looks in the specified file.
- If the Movie Toolbox cannot completely resolve all the data references, it still returns a valid movie identifier. In this case, the Movie Toolbox also sets the current error value to
couldNotResolveDataRef
.newMovieDontAskUnresolvedDataRefs
- Controls whether the Movie Toolbox asks the user to locate files. If you set this flag to 0, the Movie Toolbox asks the user to locate files that it cannot find on available volumes. If the Movie Toolbox cannot locate a file even with the user's help, the function returns a valid movie identifier and sets the current error value to
couldNotResolveDataRef
.dataRefWasChanged
- Contains a pointer to a Boolean value. The Movie Toolbox sets the Boolean to indicate whether it had to change any data references while resolving them. The toolbox sets the Boolean value to
true
if any references were changed. Use theUpdateMovieResource
function (described on page 2-91) to preserve these changes.- Set the
dataRefWasChanged
parameter tonil
if you do not want to receive this information. See the "Creating Tracks and Media Structures" beginning on page 2-136 for more information about data references.ERROR CODES
File Manager errors
badImageDescription -2001 Problem with an image description badPublicMovieAtom -2002 Movie file corrupted cantFindHandler -2003 Cannot locate a handler cantOpenHandler -2004 Cannot open a handler
Memory Manager errors